<template>
	<view class="container">
		<cu-custom bgColor="bg-gray" :isBack="true">
			<block slot="content">修改资料</block>
		</cu-custom>
		<view class="containerBox">
<!-- 			<view class="personHead">
				<view class="HeadLeft">
					<image :src="userInfo.avatar?userInfo.avatar:'../../static/errorImage.png'" mode=""></image>
					<view class="flex flex-direction margin-left">
						<view class="name">
							{{userInfo.nickName||'-'}}
						</view>
						<view class="phone margin-top-xs">
							{{userInfo.phoneNumber||'-'}}
						</view>	
					</view>
				</view>	
				<view class="cuIcon-right"></view>
			</view>	 -->
			<!--  -->
			<view class="cellBox">
				<u-cell-group  :border="false">
				    <u-cell title="头像" isLink :border="false" >
				    	<view slot="value" class="u-slot-value">
							<image  class="titImage" :src="userInfo.avatar?userInfo.avatar:'../../static/errorImage.png'" mode=""></image>
						</view>
				    </u-cell>
				</u-cell-group>
			</view>
			<!--  -->
			<view class="cellBox margin-top-lg padding-tb">
				<u-cell-group  :border="false">
				    <u-cell title="姓名" isLink :border="false" >
				    	<view slot="value" class="u-slot-value">
							{{userInfo.nickName||'-'}}
						</view>
				    </u-cell>
					<u-cell title="手机号" isLink :border="false" >
						<view slot="value" class="u-slot-value">
							{{userInfo.phoneNumber||'-'}}
						</view>
					</u-cell>
					<u-cell title="绑定微信" isLink :border="false" >
						<view slot="value" class="u-slot-value">
							{{userInfo.nickName||'-'}}
						</view>
					</u-cell>
				</u-cell-group>
			</view>
			<!--  -->
			<view class="cellBox margin-top-lg padding-tb">
				<u-cell-group  :border="false">
				    <u-cell title="行业" isLink :border="false" >
				    	<view slot="value" class="u-slot-value">
							未设置
						</view>
				    </u-cell>
					<u-cell title="收获地址" isLink :border="false" >
						<view slot="value" class="u-slot-value">
							未设置
						</view>
					</u-cell>
				</u-cell-group>
			</view>
		</view>	
	</view>
</template>
<script>
	import share from '@/components/share.vue'
	import {
		mapState,
		mapMutations
	} from 'vuex';
	export default {
		components: {
			share
		},
		data() {
			return {
			}
		},
		onLoad() {
			// this.getUserInfo()1
		},		
		onShow() {
			
		},
		computed: {
			...mapState(['hasLogin','userInfo'])
		},
		methods: {
			/**
			 * 统一跳转接口,拦截未登录路由
			 * navigator标签现在默认没有转场动画，所以用view
			 */
			navTo(url) {
				if (!this.hasLogin) {
					url = '/pages/public/login';
				}
				uni.navigateTo({
					url
				})
			},
		}
	}
</script>
<style lang='scss'>
.containerBox{
	padding: 32upx;
}
.cellBox{
	border-radius: 20upx;
	background: #fff;
}
.titImage{
	width: 120upx;
	height: 120upx;
}
</style>
